#pragma once
#include "GlobalDefine.h"

class CAutoAttackXmlConfigAdapter
{
public:
	CAutoAttackXmlConfigAdapter(LPCTSTR strTempName);
	~CAutoAttackXmlConfigAdapter(void);
	bool GetItem(CString ItemName, CString &ItemValue);
	void AddItem(CString ItemName, CString ItemValue);
	bool ReadFile(void);
	bool WriteToFile(void);
	void ClearMap(void);
	bool ReadToMap(std::map<CString,CString> &TempMap,std::list<CString> & TempList,std::list<CString> & NotDestroyItemList,std::list<CString> &NotMailItemList);
	bool WriteToLacol(std::map<CString,CString> &TempMap,std::list<CString> & TempList,std::list<CString> & NotDestroyItemList,std::list<CString> &NotMailItemList);

	std::map<CString,CString> m_ItemMap;
	std::list<CString> m_ItemList;
	std::list<CString> m_NotDestroyItemList;
	std::list<CString> m_NotMailItemList;
	
	CString m_strFileName;
};
BOOL   IsFileExist(LPCTSTR   lpFileName);